<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
//    return view('welcome');
//});

Auth::routes();

Route::get('/', 'HomeController@index')->name('home');
Route::get('/index', 'HomeController@index')->name('index');

Route::get('/talents', 'Web\TalentController@index')->name('talents');
Route::get('/talent/create', 'Web\TalentController@create')->name('talent_create');
Route::get('/talent/{id}', 'Web\TalentController@show')->name('talent_show');
Route::get('/talent/edit/{id}', 'Web\TalentController@edit')->name('talent_edit');
Route::post('/talent/store', 'Web\TalentController@store')->name('talent_store');
Route::post('/talent/update', 'Web\TalentController@update')->name('talent_update');
Route::post('/talent/delete/{id}', 'Web\TalentController@delete')->name('talent_delete');
Route::get('/talent/relation/{id}', 'Web\TalentController@relation')->name('talent_relation');


Route::post('/talent/relation/save','Web\TalentRelationshipController@createOrUpdate')->name('relationship_save');
Route::post('/talent/relation/destroy','Web\TalentRelationshipController@destroy')->name('relationship_delete');

Route::get('/histories', 'Web\HistoryController@index')->name('histories');
